import request from '@/utils/request'

// 查询催告书审批列表
export function listNoticedemandapproval(query) {
  return request({
    url: '/ruoyi-system/noticedemandapproval/list',
    method: 'get',
    params: query,
  })
}

// 查询催告书审批详细
export function getNoticedemandapproval(id) {
  return request({
    url: '/ruoyi-system/noticedemandapproval/' + id,
    method: 'get',
  })
}

// 新增催告书审批
export function addNoticedemandapproval(data) {
  return request({
    url: '/ruoyi-system/noticedemandapproval',
    method: 'post',
    data: data,
  })
}

// 修改催告书审批
export function updateNoticedemandapproval(data) {
  return request({
    url: '/ruoyi-system/noticedemandapproval',
    method: 'put',
    data: data,
  })
}

// 删除催告书审批
export function delNoticedemandapproval(id) {
  return request({
    url: '/ruoyi-system/noticedemandapproval/' + id,
    method: 'delete',
  })
}

// 预览

export function previewNoticedemandapproval(params) {
  return request({
    url: '/ruoyi-system/noticedemandapproval/preview',
    method: 'get',
    params,
  })
}

// 详情页预览
export function previewPdf(data) {
  return request({
    url: '/ruoyi-system/noticedemandapproval/pdfPreview',
    method: 'post',
    data,
  })
}

// 保存附件
export function addNoticedemandapprovalFiles(data) {
  return request({
    url: '/ruoyi-system/noticedemandapproval/addFiles',
    method: 'post',
    data,
  })
}

// 导出
export function exportNoticedemandapproval(data) {
  return request({
    url: '/ruoyi-system/noticedemandapproval/export',
    method: 'post',
    data,
    responseType: 'blob',
  })
}

// 立案号下拉
export function getCaseList() {
  return request({
    url: '/ruoyi-system/noticedemandapproval/caseList',
    method: 'get',
  })
}

// 获取处罚决定书填的内容呢
export function getContent(id) {
  return request({
    url: '/ruoyi-system/noticedemandapproval/getContent?caseId=' + id,
    method: 'get',
  })
}

// 提交流程接口
export function submitNoticedemandapproval(data) {
  return request({
    url: '/ruoyi-system/noticedemandapproval/submit',
    method: 'post',
    data,
  })
}

// 审核接口
export function reviewNoticedemandapproval(data) {
  return request({
    url: '/ruoyi-system/noticedemandapproval/review',
    method: 'post',
    data,
  })
}

// 转办接口
export function transferNoticedemandapproval(data) {
  return request({
    url: '/ruoyi-system/noticedemandapproval/transferTask',
    method: 'post',
    data,
  })
}
